<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OOJS</title>
    <script src="./js/js03_oojs_03.js" async></script>
    <link rel="stylesheet" href="./style/common.css">
</head>
<body>
    <h1>00JS---继承</h1>
    <p class="msg"></p>
    <script>
        document.addEventListener("DOMContentLoaded",function(){
            let msg=document.querySelector(".msg");
            let person=new Person("张三");
            msg.innerHTML+=person.sayHello();
            msg.innerHTML+="<br>";

            let teacher=new Teacher("李四","软件工程");
            msg.innerHTML+=teacher.sayHello();
            msg.innerHTML+="<br>";

            msg.innerHTML+=teacher.walk();

            console.log(teacher._proto_);//上一级，原型链上的上一个对象原型链
            console.log(teacher._proto_==Teacher.prototype);
            console.log(teacher._proto_.constructor);
            console.log(teacher._proto_._proto_.walk);
            console.log(Teacher.prototype._proto_._proto_.constructor);

        })

    </script>
</body>
</html>